%% Author : lichuang 

-define(ECHUBBY_CONFIG, echubby_config).

-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).

-define(CHILD_WITH_ARGS(I, Type, Args), {I, {I, start_link, Args}, permanent, 5000, Type, [I]}).

%-record(notification, {leader, gxid, epoch, state, server_id}).
%% log macros
-define(DEBUG_MSG(Format, Args),
  echubby_logger:debug_msg(?MODULE_STRING,?LINE,Format, Args)).

-define(DEBUG_MSG(Format),
  echubby_logger:debug_msg(?MODULE_STRING,?LINE,Format, [])).

-define(INFO_MSG(Format, Args),
  echubby_logger:info_msg(?MODULE_STRING,?LINE,Format, Args)).

-define(INFO_MSG(Format),
  echubby_logger:info_msg(?MODULE_STRING,?LINE,Format, [])).

-define(WARNING_MSG(Format, Args),
  echubby_logger:warning_msg(?MODULE_STRING,?LINE,Format, Args)).

-define(WARNING_MSG(Format),
  echubby_logger:warning_msg(?MODULE_STRING,?LINE,Format, [])).

-define(ERROR_MSG(Format, Args),
  echubby_logger:error_msg(?MODULE_STRING,?LINE,Format, Args)).

-define(ERROR_MSG(Format),
  echubby_logger:error_msg(?MODULE_STRING,?LINE,Format, [])).

-define(CRITICAL_MSG(Format, Args),
  echubby_logger:critical_msg(?MODULE_STRING,?LINE,Format, Args)).
-define(CRITICAL_MSG(Format),
  echubby_logger:critical_msg(?MODULE_STRING,?LINE,Format, [])).
